package main

import (
	"fmt"
	"go-canal/model"
	"go-canal/utils/database"
)

func main() {
	db := database.NewGorm(&database.Options{
		Dsn:     "root:Wallet1088@@tcp(192.168.200.140:3306)/wikitrade_analysis?charset=utf8mb4&parseTime=True&loc=Local",
		MaxConn: 10,
		MaxFree: 10,
		MaxLife: 10,
	})
	a := make([]map[string]interface{}, 0)
	a = append(a, map[string]interface{}{
		"id":                    "7035709",
		"broker_id":             "123456",
		"account_stopout_level": "0.50",
		"account_warning_level": "1.0",
		"is_vip":                "2",
		"money":                 "10000.0",
		"recommend":             "0",
		"stopout_level":         "0.95",
	})
	err := db.Model(&model.BrokerConfig{}).Create(a).Error
	if err != nil {
		fmt.Printf("err:%v\n", err)
	}
}
